{extend name="layout:base" /}

{block name="content"}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-row layui-col-space15">


            <div class="layui-card">
                <div class="layui-card-header">优化排行榜(昨日数据)</div>
                <div class="layui-card-body layui-text">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th>日排名</th>
                            <th>优化师</th>
                            <th>实扣费用</th>
                            <th>百度达标率</th>
                            <th>网站达标率</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="list" id="vo" key="k" }
                        <tr>
                            <td>{$k}</td>
                            <td>{$vo.name}</td>
                            <td> </td>
                            <td>{$vo.data_key}%</td>
                            <td>{$vo.data_web}%</td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script>
    layui.config({
        base: '__STATIC__/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'console', 'table', 'util', 'form'], function () {
        var $ = layui.$, form = layui.form, layer = layui.layer, table = layui.table;
        table.render({
            elem: '#tbList',
            url: "{:url('getList')}",
            where: {typeId: 1},
            cellMinWidth: 80,
            cols: [[
                {field: 'id', fixed: 'left', title: 'ID', width: 60, sort: false},
                {field: 'name', fixed: 'left', title: '客户', width: 200},
                {field: 'money_sc', title: '首次充值', sort: true},
                {field: 'money', title: '账户余额', sort: true},
                {field: 'money_cz', title: '累计充值', sort: true},
                {field: 'intime', title: '开户时间', width: 130},
                {fixed: 'right', title: '操作', width: 100, toolbar: '#op'}
            ]],
            page: true,
            limit: 15
        });
        table.render({
            elem: '#tbList2',
            url: "{:url('getList')}",
            where: {typeId: 2},
            cellMinWidth: 80,
            cols: [[
                {field: 'id', fixed: 'left', title: 'ID', width: 60, sort: false},
                {field: 'name', fixed: 'left', title: '客户', width: 200},
                {field: 'money_sc', title: '首次充值', sort: true},
                {field: 'money', title: '账户余额', sort: true},
                {field: 'money_cz', title: '累计充值', sort: true},
                {field: 'intime', title: '开户时间', width: 130},
                {fixed: 'right', title: '操作', width: 100, toolbar: '#op2'}
            ]],
            page: true,
            limit: 15
        });
    });
</script>
{/block}